<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

<?php
$server="localhost";
$name="root";
$pwd="123456";
$db="aliya";

$con=mysqli_connect($server,$name,$pwd,$db);

if($con){
    $id=$_GET['id'];
    $sql="select * from aliya1 whire id=".$id;
    $run=mysqli_query($con,$sql);
    if($run  && mysql_num_rows($run)>0){
        $kur=mysqli_fetch_assoc($run);
    }
}else{
    echo "未连接数据库，内容错误：".mysqli_connect_error();
}
?>

<form action="2150.php"method="post">
    <input type="hidden" name="id" value="<?echo $id??'0'?>">
    姓名：<input type="text" name="name" value="<? echo $kur['name'] ?>">
    年龄：<input type="text" name="age" value="<? echo $kur['age'] ?>">
    地址：<input type="text" name="ads" value="<? echo $kur['ads'] ?>">
    手机号：<input type="text" name="tel" value="<? echo $kur['tel'] ?>">
    职业：
    <select name="kaspi">

            <option value="java">java</option>
            <option value="php">php</option>
            <option value="python">python</option>
            <option value="bc">编程</option>
            <option value="sjwy" selected>网页设计</option>
        </select>
    <input type="submit">



</form>
</body>
</html>